package com.taxshare.seller.controller;

import com.taxshare.mybatis.pager.PageRequest;
import com.taxshare.pvalidate.ParamValid;
import com.taxshare.response.beans.Response;
import com.taxshare.seller.service.EquipmentService;
import com.taxshare.seller.service.FphmdService;
import com.taxshare.seller.view.dto.EquipmentDTO;
import com.taxshare.seller.view.dto.FphmdDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName: FphmdController
 * @Description:
 * @author: hjh
 * @date: 2024/10/21 10:36
 */
@RestController
@RequestMapping(value = "/fphmd")
@Api(tags = "发票号码段")
public class FphmdController {
    @Autowired
    private FphmdService fphmdService;

    @ApiOperation(value = "发票号码段查询", notes = "发票号码段管理")
    @PostMapping("/list")
    public Response query(@RequestBody PageRequest<FphmdDTO> param) {
        return fphmdService.query(param);
    }


    /**
     * 同步号码段
     * @return
     */
    @PostMapping(value="/tbFphmd")
    @ResponseBody
    public Map tbFphmd(@RequestParam Map<String, Object> param){
        Map map = fphmdService.tbFphmd(param);
        return map;
    }

    /**
     * 上传发票汇总确认信息
     * @param param
     * @return
     */
    @PostMapping("/SCFPHZQRXX")
    @ResponseBody
    public Map SCFPHZQRXX(@RequestParam Map<String, Object> param){
        return fphmdService.SCFPHZQRXX(param);
    }

    /**
     * 查询发票汇总确认信息
     * @param param
     * @return
     */
    @PostMapping("/CXFPHZQRXX")
    @ResponseBody
    public Map CXFPHZQRXX(@RequestParam Map<String, Object> param){
        return fphmdService.CXFPHZQRXX(param);
    }

}


